<!DOCTYPE html>
<!--
by https://zhengkai.blog.csdn.net
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <#include "/header.html">
</head>
<body class="hold-transition layout-top-nav">
<div class="wrapper">

  <!-- 导航栏 -->
  <nav class="main-header navbar navbar-expand-md navbar-light navbar-white">
    <div class="container">
      <a href="#" class="navbar-brand">
        <img src="${request.contextPath}/statics/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8">
        <span class="brand-text font-weight-light">${(value.title)!!}</span>
      </a>

      <button class="navbar-toggler order-1" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <div class="collapse navbar-collapse order-3" id="navbarCollapse">
        <i class="fa fa-fw fa-space-shuttle"></i><a>${(value.slogan)!!}</a>
      </div>

      <!-- 右侧导航栏链接 -->
      <ul class="order-1 order-md-4 navbar-nav navbar-no-expand ml-auto">
        <li class="nav-item">
          <a href="https://github.com/moshowgame/SpringBootAI" target="_blank"><i class="fa fa-fw fa-star"></i>Github </a>
        </li>
      </ul>
    </div>
  </nav>
  <!-- /.navbar -->

  <!-- Content Wrapper. 包含页面内容 -->
  <div class="content-wrapper">


    <!-- 主体内容 -->
    <div class="content">
      <div class="container">
        <div class="row">

          <!-- /.col-md-6 -->
          <div class="col-lg-12">

            <blockquote class="quote-secondary">
              ${(value.description)!!}
            </blockquote>
            <div id="rrapp" v-cloak>
              <div>
                <el-form ref="form" :inline="true" :model="formData"  label-width="100px">
                  <div class="card">
                    <div class="card-header">
                      <h5 class="card-title m-0">${(value.outputStr)!!}</h5>
                      <div class="card-tools">
                        <button type="button" class="btn btn-tool" data-card-widget="collapse" title="折叠">
                          <i class="fas fa-minus"></i>
                        </button>
                        <!-- <button type="button" class="btn btn-tool" data-card-widget="remove" title="移除">
                          <i class="fas fa-times"></i>
                        </button> -->
                      </div>
                    </div>
                    <div class="card-body">
                      <!--<el-input hidden=""
                              type="textarea"
                              :rows="10"
                              placeholder="等待AI回答中"
                              v-model="formData.output">
                      </el-input>-->
                      <p id="aiResult">
                        等待用户提问或者AI回答中
                      </p>
                      <!-- <textarea id="inputArea" placeholder="请输入表结构信息..." style="height: 250px;line-height : 10px;" v-model="formData.tableSql"></textarea> -->

                      <!-- input area-->
                      <!--<textarea id="inputArea" placeholder="请输入表结构信息..." style="height: 250px;line-height : 100px;" ></textarea>-->

                    </div>
                  </div>

                  <hr>
                  <div class="card">
                    <div class="card-header">
                      <h5 class="card-title m-0">${(value.inputStr)!!}</h5>
                      <div class="card-tools">
                        <button type="button" class="btn btn-tool" data-card-widget="collapse" title="折叠">
                          <i class="fas fa-minus"></i>
                        </button>
                        <!-- <button type="button" class="btn btn-tool" data-card-widget="remove" title="移除">
                          <i class="fas fa-times"></i>
                        </button> -->
                      </div>
                    </div>

                    <div class="card-body">
                      <!-- setting area-->
                      <el-form-item label="输入问题">
                        <el-input v-model="formData.options.question" type="textarea" rows="10" resize='none' placeholder="请输入你的问题"></el-input>
                      </el-form-item>
                      <el-form-item label="图片识别">
                        <!--<el-switch v-model="formData.options.isUseImage">使用图片</el-switch>-->
                        <el-upload
                                class="upload-demo"
                                action="${request.contextPath}/ocr"
                                multiple drag
                                :limit="1"
                                :on-exceed="handleExceed"
                                :on-preview="handlePreview"
                                :on-change="handleChange"
                                :file-list="formData.options.fileList">
                          <el-button size="small" type="primary">点击上传</el-button>
                          <i class="el-icon-upload"></i>
                          <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
                        </el-upload>
                        <!--                    <el-upload-->
                        <!--                            :action="baseUrl"-->
                        <!--                            ref="upload"-->
                        <!--                            list-type="picture-card"-->
                        <!--                            :auto-upload="false"-->
                        <!--                            :on-change="onChange"-->
                        <!--                            :on-remove="handleRemove"-->
                        <!--                            :http-request="fileLists"-->
                        <!--                            :limit="1">-->

                        <!--                        <i slot="default" class="el-icon-plus"></i>-->
                        <!--                    </el-upload>-->
                        <el-dialog >
                          <img width="100%" alt="">
                        </el-dialog>
                      </el-form-item>
                      <el-form-item label="AI引擎">
                        <el-select v-model="formData.options.engine">
                          <el-option value="spark3max" label="星火AI-3.5Max"></el-option>
                          <el-option value="spark4ultra" label="星火AI-4.0Ultra"></el-option>
                          <el-option value="aliyunQianWenMax" label="阿里通义千问Max"></el-option>
                          <el-option value="aliyunQianWenPlus" label="阿里通义千问Plus"></el-option>
                          <el-option value="gpt4o" label="GPT4o(测试版)"></el-option>
                          <el-option value="test" label="内部测试"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="操作">
                        <el-button type="primary" icon="el-icon-caret-right" @click="generate">提问</el-button>
                        <el-button type="primary" icon="el-icon-document-copy" @click="copy" plain>复制</el-button>
                      </el-form-item>
                    </div>
                  </div>

                  <hr>
                </el-form>
              </div>
            </div>
          </div>
          <!-- /.col-md-6 -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- 控制侧边栏内容在这里 -->
  </aside>
  <!-- /.control-sidebar -->

  <!-- Main Footer -->
  <footer class="main-footer">
    <!-- To the right -->
    <div class="float-right d-none d-sm-inline">
      Version ${(value.version)!!}
    </div>
    <!-- Default to the left -->
    <strong>${(value.copyright)!!} <a href="https://zhengkai.blog.csdn.net" target="_blank"><i class="fa fa-fw fa-thumbs-up"></i>zhengkai.blog.csdn.net</a> <a href="https://github.com/moshowgame/SpringBootCodeGenerator/blob/master/donate.png?raw=true" target="_blank"><i class="fa fa-fw fa-credit-card"></i>打赏</a>
  </footer>
</div>
<!-- ./wrapper -->

<script src="${request.contextPath}/statics/js/main.js"></script>
</body>
</html>
